<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<h2>Spring Boot + Thymeleaf 示例</h2>
<form th:action="@{/add}" th:object="${product}" method="POST">
    <label for="description">产品名称:</label>
    <input type="text" th:field="*{description}" value="" /><br/>

    <label for="availableFrom">有效日期:</label>
    <input type="text" th:field="*{availableFrom}" value="2018-03-28" /> <br/>

    <label for="price">价格 (RMB):</label>
    <input type="text" th:field="*{price}" size="10" value="198" /><br/>

    <input type="submit" value="提交"/>
</form>
<p th:if="${msg != null}" th:text="${msg}"></p>

</body>
</html>